﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using ml.Math;

namespace ml.Tests
{
    [TestClass]
    public class PriorityQueueTests
    {
        [TestMethod]
        public void Test_Priority_Queue_General()
        {
            int k = 5;
            var q = new PriorityQueue<int, double>(k);
            q.Enqueue(9, 7);
            q.Enqueue(12, 8);
            q.Enqueue(4, 0.3);
            q.Enqueue(2, .1);
            q.Enqueue(1, 5);
            q.Enqueue(3, 6);

            PriorityQueueItem<int, double> x;
            while (true)
            {
                if(q.Count > k)
                    x = q.Dequeue();
                else break;
            }

        }
    }
}
